package org.dromara.merchants.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import org.dromara.common.mybatis.annotation.DataColumn;
import org.dromara.common.mybatis.annotation.DataPermission;
import org.dromara.merchants.domain.TaStore;
import org.dromara.merchants.domain.vo.TaStoreVo;
import org.dromara.common.mybatis.core.mapper.BaseMapperPlus;

import java.util.List;

/**
 * 店铺Mapper接口
 *
 * @author xiyin321
 * @date 2024-07-02
 */
public interface TaStoreMapper extends BaseMapperPlus<TaStore, TaStoreVo> {

    /**
     * 查询店铺下拉列表
     */
    @DataPermission({
        @DataColumn(key = "userName", value = "user_id")
    })
    List<TaStoreVo> selectOptionList();

    /**
     * 分页查询店铺列表
     * @param build
     * @param taStoreWrapper
     * @return
     */
    @DataPermission({
        @DataColumn(key = "userName", value = "user_id")
    })
    Page<TaStoreVo> selectStorePage(@Param("page") Page<Object> build,@Param(Constants.WRAPPER) Wrapper<TaStore> taStoreWrapper);
}
